﻿module PriceTest

open System.Linq 
open System.Reactive.Linq 

open Xunit
open Xunit.FSharp

open com.ib.client

open Trading.IBApi

[<Fact>]
let ofTickType() = 
    let expected = 1.1

    [|
        Tick.AskPrice expected
        Tick.BidPrice 1.1
    |].ToObservable()  
    |> Price.ask 
    |> Observable.ToEnumerable
    |> Enumerable.ToArray
    |> should equal [| expected |]            
